var searchType = $('#J_g_search .search-type'),
    selectedType = $('#J_g_search .selected-type'),
    searchTypeDropdown = $('#J_g_search .search-type-dropdown');

searchType.hover(function() {
    searchTypeDropdown.show();
}, function() {
    searchTypeDropdown.hide();
});

//选择搜索类型
searchTypeDropdown.on('click', 'li', function(event) {
    selectedType.text(event.target.innerText);
    searchTypeDropdown.hide();
});